home *** CD-ROM | disk | FTP | other *** search
/ Mac Mania 4 / MacMania 4.toast / / Games&Education / ez-genes-02 / Source 0.2 / FamTree.p next >
Text File  |  1995-04-23  |  2KB  |  85 lines

  1. program FamilyTree;
  2.  
  3.     uses
  4.         UFamily;
  5.  
  6.     type
  7.  
  8.         TFamilyApp = object(TApplication)
  9.  
  10.                 procedure TFamilyApp.Init;
  11.  
  12.                 function TFamilyApp.DoMakeDocument (itsCmdNumber: CmdNumber): TDocument;
  13.                 OVERRIDE;
  14.                 procedure TFamilyApp.DoShowAboutApp;
  15.                 OVERRIDE;
  16.             end;
  17.  
  18.  
  19.     var
  20.         gApp: TFamilyApp;
  21.  
  22. {==========================================================================}
  23. {        A p p l i c a t i o n                                    }
  24. {==========================================================================}
  25.     procedure TFamilyApp.Init;
  26.     begin
  27.         IApplication(kFileType);
  28. {$IFC false}
  29.         EnterMacAppDebugger;
  30. {$ENDC}
  31.         fLaunchWithNewDocument := false;
  32.         InitDialogs;
  33.  
  34.         if gDeadStripSuppression then
  35.             begin
  36.                 if Member(TObject(nil), TFamilyView) then
  37.                     ;
  38.                 if Member(TObject(nil), TActiveText) then
  39.                     ;
  40.                 if Member(TObject(nil), TPersonCluster) then
  41.                     ;
  42.             end;
  43.     end;
  44.  
  45.  
  46.     function TFamilyApp.DoMakeDocument (itsCmdNumber: CmdNumber): TDocument;
  47.         OVERRIDE;
  48.         var
  49.             D: TFamilyDoc;
  50.     begin
  51.         New(D);
  52.         FailNil(D);
  53.  
  54.         D.Init;
  55.         DoMakeDocument := D;
  56.     end;
  57.  
  58.     procedure TFamilyApp.DoShowAboutApp;
  59.         OVERRIDE;
  60.     begin
  61. {if MacAppAlert(phAboutApp, nil) = 2 then}
  62.         StdAlert(phAboutApp);
  63.     end;
  64.  
  65. {===========================================================================}
  66. {        M a i n                                                 }
  67. {===========================================================================}
  68. begin
  69.     InitToolBox;                { Essential toolbox and utilities initialization }
  70.     if ValidateConfiguration(gConfiguration) then    { Make sure we can run }
  71.         begin
  72.             InitUMacApp(20);         { Initialize MacApp; 20 calls to MoreMasters}
  73. {InitUPrinting;    NOT USED}
  74.             InitUTEView;            { Initialize the TEView unit }
  75.             InitUDialog;            { Initialize the Dialog unit }
  76.             InitUGridView;
  77.  
  78.             New(gApp);            { Create an application object }
  79.             FailNil(gApp);
  80.             gApp.init;            { Initialize the application }
  81.             gApp.Run;            { Run the application }
  82.         end
  83.     else
  84.         StdAlert(phUnsupportedConfiguration);
  85. end.